package com.anpy.bill.mapper;

import com.anpy.bill.model.Account;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface AccountMapper {
    void insert(Account account);
    Account selectByIdAndUserId(@Param("id") Long id, @Param("userId") int userId);
    int updateByIdAndUserId(Account account);
    int deleteByIdAndUserId(@Param("id") Long id, @Param("userId") int userId);
    List<Account> selectByUserId(@Param("userId") int userId);
    List<Account> selectByUserIdWithPage(@Param("userId") int userId, 
        @Param("offset") int offset,
        @Param("limit") int limit);
    int countByUserId(@Param("userId") int userId);
}
